import React, { Component } from 'react'
import './Item.css'

export default class Item extends Component {
    render() {
        const { title, img, isActive, index, start, isPlaying } = this.props;
        return (
            index === 4 ?
                <div onClick={start} className={`center btn ${isPlaying ? 'mask' : ''}`}>
                    {title}
                </div>
                :
                <div className={`center prizeGrid ${isPlaying ? isActive ? '' : 'mask' : ''}`}  >
                    <img src={img} className="prizeImg" alt="" />
                    {title}
                </div>
        )
    }
}